package com.wwl.collection;

import java.util.TreeSet;

public class TreeSetDemo {
    public static void main(String[] args) {
        TreeSet ts = new TreeSet();
        ts.add(new Person(1,"Tom",170));
        ts.add(new Person(2,"John",168));
        ts.add(new Person(3,"Mike",172));
        ts.add(new Person(4,"Alice",165));
        ts.add(new Person(4,"Alice",170));
        ts.add(new Person(4,"Rose",170));

        System.out.println(ts);
    }
}
